package org.yaaic.gps_utils;

import org.yaaic.model.Server;

public class ChannelObj
{

    private final ChannelInfoObj chanInfo;
    private final LocationObj loc;
    private final Server server;


    public ChannelObj(ChannelInfoObj chanInfo, LocationObj loc, Server server)
    {
        super();
        this.chanInfo = chanInfo;
        this.loc = loc;
        this.server = server;
    }

    public ChannelObj(Server server) {
        super();
        this.server = server;
        this.chanInfo = new ChannelInfoObj(server.getTitle(), server.getHost());
        this.loc = new LocationObj(server.getLattitude(), server.getLongitude());
    }
    public ChannelInfoObj getChanInfo()
    {
        return chanInfo;
    }
    public LocationObj getLoc()
    {
        return loc;
    }
    public Server getServer() {
        return server;
    }
    @Override
    public String toString() {
        return chanInfo.getName();
    }
}
